package com.dgut.common.mapper;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.dgut.common.entity.Diary;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.dgut.common.vo.DiaryVO;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.Date;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author it00zyq
 * @since 2021-04-04
 */
@Repository
public interface DiaryMapper extends BaseMapper<Diary> {
    /**
     * 日志分页列表
     * @param userId
     * @param page
     * @return
     */
    Page<DiaryVO> listDiary(@Param("page") Page<DiaryVO> page, @Param("userId") Integer userId, @Param("begin") Date begin, @Param("end") Date end);

    /**
     * 日志详情
     * @param id
     * @return
     */
    DiaryVO detail(@Param("id") Integer id);
}
